{include file="layout_basic.tpl"}
<form actiom="" method="post">
	<fieldset>
		<legend>{$ui.newcategory}</legend>
			<dl>
				<dt> <label>{$ui.catname}</label></dt>
				<dd> <input name="nome" value="{$edit.name}" type="text"> </dd>
			</dl>
	
			<dl>
				<dt> <label>{$ui.defaultvalue}</label></dt>
				<dd> <input name="padrao" type="text" value="{$edit.valor}"> </dd>
			</dl>

			<input type="submit" value="{$ui.saveaction}"/> 
	</fieldset>
</form>

<fieldset>
	<legend>{$ui.listcategories}</legend>
	<div class="widget_tableDiv">
			<table id="datatable">
				<thead>
					<tr>
						<td>{$ui.id}</td>
						<td>{$ui.catname}</td>
						<td>{$ui.defaultvalue}</td>
						<td>{$ui.actions}</td>
					</tr>
				</thead>
				
				<tbody class="scrollingContent">
					{foreach from=$datatable item=row}
					<tr>
						<td> {$row.cod_categoria}</td>
						<td> {$row.nome_categoria}</td>
						<td> {$row.valor_padrao}</td>
						<td>
							<a href="?edit={$row.cod_categoria}" style="display:inline"><img alt="edit" border="0" src="img/edit.png"/></a>
							&nbsp;
							<a href="?del={$row.cod_categoria}" style="display:inline"><img alt="delete" border="0" src="img/delete.jpg"/></a>
						</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
		</div>
		
		<script type="text/javascript">
			initTableWidget('datatable',570,450,Array('N','S','N',false));
		</script>	
</fieldset>
{include file="layout_basic_tail.tpl"}